#ifndef RENDERER_H
#define RENDERER_H

class Renderer
{
public:
    struct LineStyle
    {
        int factor;
        unsigned short pattern;
    };

    enum BlendMode
    {
        AlphaOpacity
    };

    Renderer();

    virtual void drawLine(const QPointF& start, const QPointF & end, const QColor& color,
                          float lineWidth = 1.0f, LineStyle* pStyle = 0);
    virtual void drawRect(const QRectF& rect, const QColor& color, float lineWidth = 1.0f, LineStyle* pStyle = 0);
    void drawCircle(const QPointF& center, float radius,
                    const QColor& color, float lineWidth = 1.0f, LineStyle* pStyle = 0);
    void drawCircle(const QPointF& center, float radius, float startAngle, float endAngle,
                    const QColor& color, float lineWidth = 1.0f, LineStyle* pStyle = 0);

    void enableBlending(BlendMode mode);
    void disableBlending();
private:
    void applyColor(const QColor& color);
};

#endif // RENDERER_H
